#include <iostream>
#include "cash.h"


CashSuper::CashSuper()
{
    std::cout << "CashSuper" << std::endl;
}

CashSuper::~CashSuper()
{
    std::cout << "~CashSuper" << std::endl;
}

CashNormal::CashNormal()
{
    std::cout << "CashNormal" << std::endl;
}

CashNormal:: ~CashNormal()
{
    std::cout << "~CashNormal" << std::endl;
}

double CashNormal::GetCash(double money)
{
    std::cout << "CashNormal::GetCash:" << money << std::endl;
    return money;
}

CashRebate::CashRebate()
{
    std::cout << "CashRebate" << std::endl;
}

CashRebate::~CashRebate()
{
    std::cout << "~CashRebate" << std::endl;
}

double CashRebate::GetCash(double money)
{
    std::cout << "CashRebate::GetCash:"<< money * 0.8 << std::endl;
    return money * 0.8;
}

CashReturn::CashReturn()
{
    std::cout << "CashReturn" << std::endl;
}

CashReturn::~CashReturn()
{
    std::cout << "~CashReturn" << std::endl;
}

double CashReturn::GetCash(double money)
{
    if (300 < money) money -= 100;
    std::cout << "CashReturn::GetCash:" << money << std::endl;
    return money;
}


